import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementPlus from 'element-plus';
import './assets/scss/style.scss';
import 'element-plus/dist/index.css';
import './global.css'; // 引入全局样式
import * as echarts from 'echarts';
import dataV from '@jiaminghi/data-view';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import axios from './http';
import VueLazyload from 'vue-lazyload'; // 引入 vue-lazyload
import 'video.js/dist/video-js.css'; // 引入 Video.js 的 CSS
document.title = '慧商管成指挥平台';
const app = createApp(App);

app.config.globalProperties.$echarts = echarts;
app.config.globalProperties.$axios = axios;

// 使用 VueLazyload 插件
app.use(VueLazyload, {
  preLoad: 1.3,
//   error: require('@/assets/error.png'), // 设置加载失败时显示的图片
//   loading: require('@/assets/loading.gif'), // 设置加载时显示的图片
  attempt: 1
});
app.use(store);
app.use(router);
app.use(ElementPlus);
app.use(dataV);
app.mount('#app');
